\defmodule{MathFunctionWithDerivative}

Represents a mathematical function whose
$n$th derivative can be computed using
\method{derivative}{double, int}.

\bigskip\hrule

\begin{code}
\begin{hide}
/*
 * Class:        MathFunctionWithDerivative
 * Description:
 * Environment:  Java
 * Software:     SSJ
 * Copyright (C) 2001  Pierre L'Ecuyer and Universite de Montreal
 * Organization: DIRO, Universite de Montreal
 * @author       Éric Buist
 * @since

 * SSJ is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License (GPL) as published by the
 * Free Software Foundation, either version 3 of the License, or
 * any later version.

 * SSJ is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * A copy of the GNU General Public License is available at
   <a href="http://www.gnu.org/licenses">GPL licence site</a>.
 */
\end{hide}
package umontreal.iro.lecuyer.functions;\begin{hide}

\end{hide}

public interface MathFunctionWithDerivative extends MathFunction\begin{hide} {
\end{hide}

   public double derivative (double x, int n);\begin{hide}
}\end{hide}
\end{code}
\begin{tabb}
   Computes (or estimates) the $n$th derivative
   of the function at point \texttt{x}.
   For $n=0$, this returns the result of
   \externalmethod{umontreal.iro.lecuyer.functions}{MathFunction}{evaluate}{double}.
\end{tabb}
\begin{htmlonly}
   \param{x}{the point to evaluate the derivate to.}
   \param{n}{the order of the derivative.}
   \return{the resulting derivative.}
   \exception{IllegalArgumentException}{if \texttt{n} is negative or 0.}
\end{htmlonly}
